package com.kehutong.tag.dao;

import org.coraframework.orm.annotation.Dao;
import org.coraframework.orm.annotation.Mapper;
import org.coraframework.orm.jdbc.Page;
import org.coraframework.orm.jdbc.execute.Condition;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Dao
public interface UserTagDao {
    @Mapper(
            genericType = HashMap.class,
            sql="SELECT count(1) as count FROM t_user_tag WHERE ${}"
    )
    Map<String, Object> getUserTagCount(Condition... condition);


    @Mapper(
            genericType = HashMap.class,
            sql="SELECT DISTINCT tagGroupName AS name FROM t_user_tag  WHERE ${}"
    )
    List<Map<String, Object>> getUserTagGroupList(Condition... condition);


    @Mapper(
            genericType = HashMap.class,
            sql="SELECT DISTINCT tagName AS name FROM t_user_tag  WHERE ${}"
    )
    List<Map<String, Object>> getUserTagList(Condition... condition);

}
